using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace ServiceStack
{
	public class ByteArrayComparer : IEqualityComparer<byte[]>
	{
		[CompilerGenerated]
		[Serializable]
		private sealed class <>c
		{
			public static readonly ByteArrayComparer.<>c <>9 = new ByteArrayComparer.<>c();
			public static Func<byte, int> <>9__2_0;
			internal int <GetHashCode>b__2_0(byte b)
			{
				return (int)b;
			}
		}
		public static ByteArrayComparer Instance = new ByteArrayComparer();
		public bool Equals(byte[] left, byte[] right)
		{
			if (left == null || right == null)
			{
				return left == right;
			}
			return left.SequenceEqual(right);
		}
		public int GetHashCode(byte[] key)
		{
			if (key == null)
			{
				throw new ArgumentNullException("key");
			}
			Func<byte, int> arg_2E_1;
			if ((arg_2E_1 = ByteArrayComparer.<>c.<>9__2_0) == null)
			{
				arg_2E_1 = (ByteArrayComparer.<>c.<>9__2_0 = new Func<byte, int>(ByteArrayComparer.<>c.<>9.<GetHashCode>b__2_0));
			}
			return key.Sum(arg_2E_1);
		}
	}
}
